package com.itheima.test3;

public class AnimalTest {
    public static void main(String[] args) {
        Cat c = new Cat();
        c.setName("花花");
        c.setAge(2);
        c.setType("暹罗猫");
        System.out.println("这只猫的名字叫"+c.getName()+"   年龄:"+c.getAge()+"岁  品种:" + c.getType());
        c.withPeople();
        Dog d = new Dog();
        d.setName("大黄");
        d.setAge(3);
        d.setColor("黄色");
        System.out.println("这只狗的名字叫"+d.getName()+"   年龄:"+d.getAge()+"岁  颜色:" +d.getColor());
        d.withPeople();

    }
}
